package cn.iocoder.boot;

import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.util.Base64;

//TIP 要<b>运行</b>代码，请按 <shortcut actionId="Run"/> 或
// 点击装订区域中的 <icon src="AllIcons.Actions.Execute"/> 图标。
public class Main {
    public static void main(String[] args) {
        //TIP 当文本光标位于高亮显示的文本处时按 <shortcut actionId="ShowIntentionActions"/>
        // 查看 IntelliJ IDEA 建议如何修正。
        System.out.printf("Hello and welcome!");

        for (int i = 1; i <= 5; i++) {
            //TIP 按 <shortcut actionId="Debug"/> 开始调试代码。我们已经设置了一个 <icon src="AllIcons.Debugger.Db_set_breakpoint"/> 断点
            // 但您始终可以通过按 <shortcut actionId="ToggleLineBreakpoint"/> 添加更多断点。
            System.out.println("i = " + i);
        }

        String base64png="iVBORw0KGgoAAAANSUhEUgAABTgAAAC4CAYAAADHYYOEAAAgAElEQVR4Xu3debAsZXkHYPZ9dwMRPajggqgJJmLKKLjiEqNGSmPE+IcVUUnKuMdCY0VRI5YkKhJNKolVUaMpMSpKjAkYFdy3uG94BYpFIAKKC2t+b5xODeOcc2fObN0zT1e9NTM93V+/3/P1rTvnre7+tt3GQoAAAQIECBAgQIAAAQIECBAgQIAAgY4KbNvRvKVNgAABAgQIECBAgAABAgQIECBAgACBbRQ4nQQECBAgQIAAAQIECBAgQIAAAQIECHRWQIGzs0MncQIECBAgQIAAAQIECBAgQIAAAQIEFDidAwQIECBAgAABAgQIECBAgAABAgQIdFZAgbOzQydxAgQIECBAgAABAgQIECBAgAABAgQUOJ0DBAgQIECAAAECBAgQIECAAAECBAh0VkCBs7NDJ3ECBAgQIECAAAECBAgQIECAAAECBBQ4nQMECBAgQIAAAQIECBAgQIAAAQIECHRWQIGzs0MncQIECBAgQIAAAQIECBAgQIAAAQIEFDidAwQIECBAgAABAgQIECBAgAABAgQIdFZAgbOzQydxAgQIECBAgAABAgQIECBAgAABAgQUOJ0DBAgQIECAAAECBAgQIECAAAECBAh0VkCBs7NDJ3ECBAgQIECAAAECBAgQIECAAAECBBQ4nQMECBAgQIAAAQIECBAgQIAAAQIECHRWQIGzs0MncQIECBAgQIAAAQIECBAgQIAAAQIEFDidAwQIECBAgAABAgQIECBAgAABAgQIdFZAgbOzQydxAgQIECBAgAABAgQIECBAgAABAgQUOJ0DBAgQIECAAAECBAgQIECAAAECBAh0VkCBs7NDJ3ECBAgQIECAAAECBAgQIECAAAECBBQ4nQMECBAgQIAAAQIECBAgQIAAAQIECHRWQIGzs0MncQIECBAgQIAAAQIECBAgQIAAAQIEFDidAwQIECBAgAABAgQIECBAgAABAgQIdFZAgbOzQydxAgQIECBAgAABAgQIECBAgAABAgQUOJ0DBAgQIECAAAECBAgQIECAAAECBAh0VkCBs7NDJ3ECBAgQIECgYwL9v7tGeV/dW2+7aXW92r8hcWOvwfV+G076m/GmdRJu1lf79X697Ubt76T7j3oc2xEgQIAAAQIECLRIYNIfqy3qilQIECBAgAABAjMR2D6t7tgrNm6X1/6o31KDUUn0r2uS2jlvqq2KamOHvvf965v3zXb1WtvWPs130+hotXWLXruX57UKnXWcnXr9bV6r7/1ReYyyVLHxul5cm9frE/Va65rXel953DOxe+LHiabY2n+M+q5ij95rvS/jSxMXJS5L3L63/1/m9epRErQNAQIECBAgQIDAcggocC7HOOoFAQIECBAgMD2BvdPU/olbJ9YShyd2SZyfqALbPol9+2LXvK/i5bCo7yzzFbggh6tip4UAAQIECBAgQGBFBBQ4V2SgdZMAAQIECBD4P4EqWh6YOCBx297ng/JaBc2K2ySqKNlcLVkFzSpcWrol4Ddut8ZLtgQIECBAgACBiQT8+JuIz84ECBAgQIBAywTq1uVDEndIrCXumKgC5u0SVdhc71bw/vV+H7VsUMdMp25z32vMfWxOgAABAgQIECDQYQE/4Ds8eFInQIAAAQIrKlBFzEMHiph1S/KdEvVMyXqOZBPN8yun+ezKFWXvTLf/KZke15lsJUqAAAECBAgQIDCxgALnxIQaIECAAAECBGYgUM+8rIJlXYG51nt/cF4rbpmoSW+a4mUzWU8zEc8M0tFk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VqK5by+vK3Loys67SrHWj9mGUftqGAAECBAgQIECAQCcEZvnDuxMAkiRAgAABAi0TaK4ErSLZWi+qKNrErVuWr3RmI1CFyipYNreV1/vvJr6TuDChkDkbd60SIECAAAECBAh0UECBs4ODJmUCBAgQWGmBvdL7mtX9sMQ9EjXT+11XWmR5Ol9XsL4ncVqiJgGyECBAgAABAgQIECAwgoAC5whINiFAgAABAi0X2D35PSjxiMTvJ+Zxm3vLSTqVXs16/4bEKxJXdipzyRIgQIAAAQIECBBogYACZwsGQQoECBAgQGBKAjWxzbUJ/79PCXRGzVyQds9N1CRA9frFRBU5LQQIECBAgAABAgQIbELAH0CbQLMLAQIECBBosUBNmrNzi/NbpdSuSGdr8qQmaiKgLyQuWiUEfSVAgAABAgQIECAwawEFzlkLa58AAQIECMxX4IU53KsS28/3sCt5tJro50eJHyZqFvWaAOgrif9O1FWZ/7OSKjpNgAABAgQIECBAYM4CCpxzBnc4AgQIECBAYO4Cdev+rr3Ype+13leM83vo6mxfV2ZW8fLHc++JAxIgQIAAAQIECBAg8CsC4/ygx0eAAAECBAgQIECAAAECBAgQIECAAIFWCShwtmo4JEOAAAECBAgQIECAAAECBAgQIECAwDgCCpzjaNmWAAECBAgQIECAAAECBAgQIECAAIFWCShwtmo4JEOAAAECBAgQIECAAAECBAgQIECAwDgCCpzjaNmWAAECBAgQIECAAAECBAgQIECAAIFWCShwtmo4JEOAAAECBAgQIECAAAECBAgQIECAwDgCCpzjaNmWAAECBAgQIECAAAECBAgQIECAAIFWCShwtmo4JEOAAAECBAgQIECAAAECBAgQIECAwDgCCpzjaNmWAAECBAgQIECAAAECBAgQIECAAIFWCShwtmo4JEOAAAECBAgQIECAAAECBAgQIECAwDgCCpzjaNmWAAECBAgQIECAAAECBAgQIECAAIFWCShwtmo4JEOAAAECBAgQIECAAAECBAgQIECAwDgCCpzjaNmWAAECBAgQIECAAAECBAgQIECAAIFWCShwtmo4JEOAAAECBAgQIECAAAECBAgQIECAwDgCCpzjaNmWAAECBAgQIECAAAECBAgQIECAAIFWCSxtgfPoo49+80033fTMVmlLhgABAgQIECBAgAABAgQIECBAgMACBLbddtvTzj777Gct4NAzP+RSFjhT3HxUiptnzFzPAQgQIECAAAECBAgQIECAAAECBAh0RCBFzkenyPnBjqQ7cpoKnCNT2ZAAAQIECBAgQIAAAQIECBAgQIBAdwUUODs2dm5R79iASZcAAQIECBAgQIAAAQIECBAgQGBmAm5RnxmthgkQIECAAAECBAgQIECAAAECBAgQILB5gaW8RX3zHPYkQIAAAQIECBAgQIAAAQIECBAgQKBLAmsUJyAAAANzSURBVAqcXRotuRIgQIAAAQIECBAgQIAAAQIECBAgcDMBBU4nBAECBAgQIECAAAECBAgQIECAAAECnRVQ4Ozs0EmcAAECBAgQIECAAAECBAgQIECAAAEFTucAAQIECBAgQIAAAQIECBAgQIAAAQKdFVDg7OzQSZwAAQIECBAgQIAAAQIECBAgQIAAAQVO5wABAgQIECBAgAABAgQIECBAgAABAp0VUODs7NBJnAABAgQIECBAgAABAgQIECBAgAABBU7nAAECBAgQIECAAAECBAgQIECAAAECnRVQ4Ozs0EmcAAECBAgQIECAAAECBAgQIECAAAEFTucAAQIECBAgQIAAAQIECBAgQIAAAQKdFVDg7OzQSZwAAQIECBAgQIAAAQIECBAgQIAAAQVO5wABAgQIECBAgAABAgQIECBAgAABAp0VUODs7NBJnAABAgQIECBAgAABAgQIECBAgAABBU7nAAECBAgQIECAAAECBAgQIECAAAECnRVQ4Ozs0EmcAAECBAgQIECAAAECBAgQIECAAAEFTucAAQIECBAgQIAAAQIECBAgQIAAAQKdFVDg7OzQSZwAAQIECBAgQIAAAQIECBAgQIAAAQVO5wABAgQIECBAgAABAgQIECBAgAABAp0VUODs7NBJnAABAgQIECBAgAABAgQIECBAgAABBU7nAAECBAgQIECAAAECBAgQIECAAAECnRVQ4Ozs0EmcAAECBAgQIECAAAECBAgQIECAAAEFTucAAQIECBAgQIAAAQIECBAgQIAAAQKdFVDg7OzQSZwAAQIECBAgQIAAAQIECBAgQIAAAQVO5wABAgQIECBAgAABAgQIECBAgAABAp0VUODs7NBJnAABAgQIECBAgAABAgQIECBAgAABBU7nAAECBAgQIECAAAECBAgQIECAAAECnRVQ4Ozs0EmcAAECBAgQIECAAAECBAgQIECAAAEFTucAAQIECBAgQIAAAQIECBAgQIAAAQKdFVDg7OzQSZwAAQIECBAgQIAAAQIECBAgQIAAAQVO5wABAgQIECBAgAABAgQIECBAgAABAp0VUODs7NBJnAABAgQIECBAgAABAgQIECBAgAABBU7nAAECBAgQIECAAAECBAgQIECAAAECnRVQ4Ozs0EmcAAECBAgQIECAAAECBAgQIECAAIH/BUPA5dcY+HunAAAAAElFTkSuQmCC";
        base64StrToImage(base64png,"wuqionglei");
                //https://qianqianquege.com/images/base64/
    }

    /**
     * base64编码字符串转换为图片
     * @param imgStr base64编码字符串
     * @param fileName 图片名称
     * @return
     */
    public static boolean base64StrToImage(String imgStr ,String fileName){
        String rootPath  =System.getProperty("user.dir");//获取用户的当前工作目录
        String filePath = rootPath+"\\src\\main\\resources\\";
        // String a="";
        // String  filePath = new File(this.getClass ().getResource ("")).getPath ()+a;
        System.out.println (filePath);
        String path = new StringBuilder ().append (filePath)
                .append ("/photo/")
                .append (fileName)
                .append (".png").toString();
        if(imgStr==null){
            return false;
        }
        Base64.Decoder decoder = Base64.getDecoder ();
        try {
            // 解密
            byte[] b = decoder.decode(imgStr);
            // 处理数据
            for (int i = 0; i < b.length; ++i) {
                if (b[i] < 0) {
                    b[i] += 256;
                }
            }
            // 文件夹不存在则自动创建
            File tempfile = new File (path);
            if(!tempfile.getParentFile().exists()){
                tempfile.getParentFile().mkdirs();
            }
            OutputStream out  = new FileOutputStream(tempfile);
            out.write(b);
            out.flush();
            out.close();
            return true;
        }catch (Exception e){
            return false;
        }
    }
}